package findSpecialInteger;

public class Solution {
    public int findSpecialInteger(int[] arr) {
        // 双指针
        int r = 1;
        int l = 0;
        int target = arr.length/4;
        while(r<arr.length){
            if(arr[r]!=arr[l]){
                l = r;
            }
            if(r-l+1>target){
                return arr[r];
            }
            r++;
        }
        return 0;
    }
}
